<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- style也是支持对象的写法 -->
      <!-- 对象的key是css属性, value的变量或者表达式 -->
      <!-- <p style="transform: translateX(100px)"></p> -->
      <h2
        :style="{
          color: color2,
          'font-size': size + 'px',
          transform: 'translateX(' + tlx + 'px)'
        }"
      >
        style的绑定
      </h2>
      <button v-on:click="size += 10">btn</button>
    </div>

    <script src="./lib/vue3.js"></script>
    <script>
      const app = Vue.createApp({
        data() {
          return {
            color2: "red",
            size: 50,
            tlx: 100,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
